package com.h.forum.controller;

import com.h.forum.pojo.response.AppResult;
import com.h.forum.exception.ApplicationException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @RequestMapping("/exception")
    public AppResult<?> testException() throws Exception{
        throw new Exception("这是一个Exception");
    }

    @RequestMapping("/appException")
    public AppResult<?> testAppException() {
        throw new ApplicationException("这是一个ApplicationException");
    }
}
